﻿<%@ Page Language="C#" Inherits="E.Web.Teacher.teacher.Edit" %>
<%@ Import Namespace="E.Model" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <title>教师信息</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  <link rel="stylesheet" href="/css/main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/t_main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/teacher.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/exam.css" type="text/css" media="all" />
  <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
  <script type="text/javascript" src="/js/ajax.js"></script>
  <script type="text/javascript" src="/js/exam.js"></script>
  <script type="text/javascript" src="/js/teacher.js"></script>
  <script type="text/javascript">
    window.onload = function() {
      document.getElementById("form1").style.display = "";
    }
  </script>
</head>
<body>
  <form id="form1" method="post" action="" style="display:none;">
    <div class="m_top"></div>
    <div class="block_2">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;教师信息</div>
      </div>
      <div class="spe_line_2"></div>
      <% if (act == "n") { %>
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>登录名：</div>
        <div class="fl"><input type="text" id="LoginIDTxt" name="LoginIDTxt" maxlength="50" onblur="CheckLoginID(this.value);" value="<%=model.LoginID %>" /></div>
        <div class="fl" style="line-height:20px; _line-height:23px;">&nbsp;<span class="hint" id="chkLoginIDRst"></span></div>
      </div>
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>密码：</div>
        <div class="fl"><input type="password" id="PwdTxt" name="PwdTxt" maxlength="50" value="111111" /></div>
        <div class="fl hint" style="line-height:20px; _line-height:23px;">&nbsp;*默认密码：111111</div>
      </div>
      <% } else { %>
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>登录名：</div>
        <div class="fl" style="line-height:20px; _line-height:23px;"><%=model.LoginID %></div>
      </div>
      <% } %>
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>姓名：</div>
        <div class="fl"><input type="text" id="NameTxt" name="NameTxt" maxlength="50" value="<%=model.Name %>" /></div>
      </div>
      <div class="box_1">
        <div class="fl tr left">性别：</div>
        <div class="fl">
          <input type="radio" id="MaleRg" name="GenderRg" value="1" style="width:20px; height:23px;" class="fl" checked="checked" /><span class="fl" style="margin-top:5px;">男</span>
          <input type="radio" id="FemaleRg" name="GenderRg" value="0" style="width:20px; height:23px;" class="fl" /><span class="fl" style="margin-top:5px;">女</span>
        </div>
      </div>
      <div class="box_1">
        <div class="fl tr left">Email：</div>
        <div class="fl"><input type="text" id="EmailTxt" name="EmailTxt" maxlength="100" value="<%=model.Email %>" /></div>
      </div>
      <%--<div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>忘记密码提示问题：</div>
        <div class="fl">
        <% if (questionList != null && questionList.Count > 0) { %>
          <select id="QuestionSlt" name="QuestionSlt">
            <option value="-1">请选择</option>
           <% foreach (System.Collections.Generic.KeyValuePair<int, string> kvp in questionList) { %>
            <option value="<%=kvp.Key %>"><%=kvp.Value %></option>
           <% } %>
          </select>
        <% } %>
        </div>
      </div>
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>提示问题答案：</div>
        <div class="fl"><input type="text" id="AnswerTxt" name="AnswerTxt" value="<%=model.ForgetPwdAnswer %>" /></div>
      </div>--%>
      
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>权限：</div>
        <div class="fl">
          <select id="AuthoritySlt" name="AuthoritySlt" onchange="ChangeInternal(this.value);">
            <option value="-1">请选择</option>
            <% foreach (System.Collections.Generic.KeyValuePair<int, string> kvp in authorityList) { %>
            <option value="<%=kvp.Key %>"><%=kvp.Value %></option>
            <% } %>
          </select>
        </div>
      </div>
      <div id="project" class="box_1" style="display:none;">
        <div class="fl tr left"><span class="hint">*</span>项目列表：</div>
        <div class="fl">
          <select id="ProjectSlt" name="ProjectSlt">
            <option value="-1">请选择</option>
            <% foreach (System.Collections.Generic.KeyValuePair<int, string> kvp in projectList) { %>
            <option value="<%=kvp.Key %>"><%=kvp.Value %></option>
            <% } %>
          </select>
        </div>
      </div>
      
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>地区：</div>
        <div class="fl">
          <ul>
          <% if (areaList != null && areaList.Count > 0) { %>
            <% int i = 0; %>
            <% foreach(DictAreaModel areaModel in areaList) { %>
            <li><input type="checkbox" id="AreaChb_<%=i %>" name="AreaChb" class="fl c_chb" value="<%=areaModel.ID%>" /><div class="fl left_2">&nbsp;<%=areaModel.Name%></div></li>
            <% i++; %>
            <% } %>
          <% } %>
          </ul>
        </div>
      </div>
      
      <input type="hidden" id="act" name="act" value="<%=act %>" />
      <input type="hidden" id="id" name="id" value="<%=id %>" />
      <input type="hidden" id="chk_v" name="chk_v" />
      <input type="hidden" id="area_v" name="area_v" value="<%=area_v %>" />
      <input type="hidden" id="chkloginrst" name="chkloginrst" value="1" />
      <input type="hidden" id="cerid" name="cerid" value="<%=model.CertificateID %>" />
      <input type="hidden" id="aid" name="aid" value="<%=(int)model.Authority %>" />
      <div style="width:350px; margin-top:20px; text-align:center;">
        <input type="image" src="/images/btn/confirm.gif" style="width:52px; height:22px;" onclick="return CheckForm();" />
        <% if (act == "u") { %>
        &nbsp;&nbsp;<a href="/teacher/List.aspx"><img alt="" src="/images/btn/back.gif" /></a>
        <% } %>
      </div>
    </div>
    
      <% if (act == "u") { %>
    <script type="text/javascript">
      InitAreaData();
      <% if (model.Gender) { %>
      document.getElementById("MaleRg").checked = true;
      <% } else { %>
      document.getElementById("FemaleRg").checked = true;
      <% } %>
      document.getElementById("AuthoritySlt").value = <%=(int)model.Authority %>;
//      document.getElementById("QuestionSlt").value = '<%=model.ForgetPwdQuestionID %>';
      
      <% if (model.CertificateID != -1) { %>
        document.getElementById("ProjectSlt").value = '<%=model.CertificateID %>';
        document.getElementById("ProjectSlt").disabled = true;
        document.getElementById("project").style.display = "";
        document.getElementById("AuthoritySlt").disabled = true;
      <% } else { %>
        document.getElementById("AuthoritySlt").disabled = true;
      <% } %>
      
    </script>
      <% } %>
  </form>
</body>
</html>
